home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c-part2 / 14046 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  601 b 

  1. Path: ren.cei.net!usenet
  2. From: james lemley
  3. Newsgroups: comp.lang.c,comp.unix.programmer
  4. Subject: Q: '\n' character
  5. Date: 11 Apr 1996 14:49:51 GMT
  6. Organization: none to speak of
  7. Distribution: world
  8. Message-ID: <4kj66f$k0o@ren.cei.net>
  9. NNTP-Posting-Host: gatekeeper.acxiom.com
  10. Mime-Version: 1.0
  11. Content-Type: text/plain; charset=us-ascii
  12. X-Newsreader: <QVT/News ver. 4.0>
  13.  
  14. >>>Is there a function or some sort of way that I could remove '\n'
  15. >>>charecter form the end of the string. 
  16.  
  17. fgets(buffer, file); 
  18. buffer[strlen(buffer)-1]=0;  
  19.  
  20.  
  21. It may not be the fastest, but it is darned near the easiest. 
  22.  
  23.